# -*- codeing = utf-8 -*-
# @Time : 2022/9/14 13:45
# @Author : 计科1814-16-徐澳
# @Software: PyCharm

#   0代表石头     1代表剪刀   2代表布
import random
money = 50

while 1:
    if money <= 0:
        print("这局游戏你输了")
        break
    if money >=100:
        print("这局游戏你赢了")
        break
    print("-"*30,"\n当前余额:",money)
    system = random.randint(0,2)
    user =int(input("请出拳(0代表石头     1代表剪刀   2代表布):"))
    if system == 0 and user == 1:    #石头对剪刀  电脑赢
        print("你输了,扣5块钱")
        money -=5
        continue
    if system == 0 and user == 2:   #石头对布   电脑输
        print("你赢了,加10块钱")
        money += 10
        continue
    if system == 1 and user == 0:    #剪刀对石头  电脑输
        print("你赢了,加10块钱")
        money += 10
        continue
    if system == 1 and user == 2:   #剪刀对布   电脑赢
        print("你输了,扣5块钱")
        money -= 5
        continue
    if system == 2 and user == 0:    #布对石头  电脑赢
        print("你输了,扣5块钱")
        money -= 5
        continue
    if system == 2 and user == 1:   #布对剪刀   电脑输
        print("你赢了,加10块钱")
        money += 10
        continue
    print("打平了")